﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eloquera.Client;

namespace BlogEngine.Core.Providers {
    public partial class EloqueraBlogProvider : BlogProvider {
        static DB eqDb = null;
        public static DB EqDb {
            get {
                if ((eqDb == null) || (!eqDb.IsTypeRegistered("System.Object"))) {
                    string conStr = System.Web.Configuration.WebConfigurationManager.AppSettings["Eloquera_Con_String"];
                    if (String.IsNullOrEmpty(conStr)) {
                        conStr = "server=localhost;password=;options=none;";
                    }
                    eqDb = new DB(conStr);
                    eqDb.OpenDatabase("BlogNetForum");
                }
                return eqDb;
            }
        }
    }
}
